#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main()
{
    int arr[20] = { 0 };
    int n = 0;
    scanf("%d", &n);
    int i = 0;
    for (i = 0; i < n; i++)
    {
        scanf("%d", &arr[i]);
    }
    int* p = (int*)malloc(8 * n);
    if (p == NULL)
    {
        return 1;
    }
    for (i = 0; i < n; i++)
    {
        *(p + i) = arr[i];
        *(p + n + i) = arr[i];
    }
    for (int j = 0; j < 2 * n; j++)
    {
        printf("%d ", *(p + j));
    }
    free(p);
    p = NULL;

    return 0;
}
